An inkjet printer as an example of a printer is known that performs printing by ejecting liquid from nozzles. The inkjet printer is a so-called a serial type and can perform bidirectional printing. When printing is performed, ejection timing in the bidirectional printing is determined depending on the temperature detected by a temperature sensor. Thereby, deviation of droplet landing positions in a scanning direction at the time when a liquid ejection head is moved to one side of the scanning direction and when the liquid ejection head is moved to the other side is suppressed in bidirectional printing.